<div style="min-width:700px;">
<nz-breadcrumb class="breadcrumb-pos">
  <i nz-icon type="link" theme="outline" style="color:#1890FF;padding-right:4px"></i>
  <nz-breadcrumb-item>
    不指派任务
  </nz-breadcrumb-item>
</nz-breadcrumb>
<div nz-row [nzGutter]="16" style="border-bottom: 1px solid #ccc;margin-bottom: 8px;">
  <div nz-col [nzSpan]="6">
    <nz-form-item nzFlex>
      <nz-form-label>品牌名</nz-form-label>
      <nz-form-control>
        <input nz-input [(ngModel)]="brandName">
      </nz-form-control>
    </nz-form-item>
  </div>
  <div nz-col [nzSpan]="8">
    <nz-form-item nzFlex>
      <nz-form-label>故障代码</nz-form-label>
      <nz-form-control>
        <input nz-input [(ngModel)]="codes">
      </nz-form-control>
      <button nz-button [nzType]="'primary'" [nzLoading]="btn_loading" style="margin:3px 0 0 20px;" (click)="getDatalist()">查询</button>
    </nz-form-item>
  </div>
</div>

<div class="add_btn">
  <button nz-button nzType="primary" routerLink="/main/addnotdealfault"><i nz-icon type="plus"></i>添加</button>
  <button nz-button style="float:right" (click)="exportOut()">导出Excel</button>
</div>
<nz-table #basicTable [nzData]="datalist" [nzLoading]="loading" [nzShowPagination]="false" [nzBordered]="true">
  <thead>
    <tr>
      <th>品牌名称</th>
      <th>故障名称</th>
      <th>故障代码</th>
      <th>描述</th>
      <th>创建时间</th>
      <th nzWidth="60px">操作</th>
    </tr>
  </thead>
  <tbody>
    <tr *ngFor="let data of datalist">
      <td>{{data.brandId == -1 ? '系统参数' : brandinfo[data.brandId].name}}</td>
      <td>{{data.name}}</td>
      <td>{{data.codes}}</td>
      <td>{{data.profile?data.profile:"--"}}</td>
      <td>{{data.dateAdd.slice(0,10)}}</td>
      <td>
          <nz-popconfirm  [nzTitle]="'确定要删除么?'" (nzOnConfirm)="delete(data.id)">
            <a nz-popconfirm style="color:#E48675;">删除</a>
          </nz-popconfirm>
      </td>
    </tr>
  </tbody>
</nz-table>
<nz-pagination style="float:right;margin-top:12px" [nzPageIndex]="PageIndex" [nzPageSize]="PageSize" [nzTotal]="PageTotal" (nzPageIndexChange)="PageIndexChange($event)" [nzHideOnSinglePage]="true" [nzShowTotal]="totalTemplate"></nz-pagination>
<ng-template #totalTemplate let-total>
  共 {{total}} 条数据
</ng-template>
</div>